package edu.cgpi.core.entidade;

import java.awt.Color;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamOmitField;

public class Cor {
	
	@XStreamOmitField
	private Color cor;

	private int R;
	private int G;
	private int B;
	
	public Cor(Color cor) {
		this.cor = cor;
		R = cor.getRed();
		G = cor.getGreen();
		B = cor.getBlue();
	}
	
	public Cor(int r, int g, int b) {
		super();
		R = r;
		G = g;
		B = b;
		cor = new Color(R, G, B);
	}

	public int getR() {
		return R;
	}
	public void setR(int r) {
		R = r;
	}
	public int getG() {
		return G;
	}
	public void setG(int g) {
		G = g;
	}
	public int getB() {
		return B;
	}
	public void setB(int b) {
		B = b;
	}

	public Color getCor() {
		return cor;
	}

	public void setCor(Color cor) {
		this.cor = cor;
	}
	
	
	
}
